<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page isELIgnored="false" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
    <link rel="stylesheet" href="css/button.css">
    <link href="css/style.css" rel="stylesheet" type="text/css"/>
    <script src="js/myJs.js"></script>
    <script>
        //验证提交表单
        function validatePost() {
            if (validateFiled($("passWord"), "登录密码") == true) {
                $("editAdminForm").submit();
            }
        }
    </script>
</head>
<body id="editAdmin">
${message}
<form action="AdminServlet?action=editAdmin" id="editAdminForm" method="post">
    <h3>修改管理员信息</h3>
    <label for="adminName"><span>用户名：</span><input id="adminName" name="adminName" type="text" readonly="readonly" value="${admin.adminName}"/></label>
    <label for="passWord"><span>登录密码：</span><input id="passWord" name="passWord" type="password"/></label>
    <label for="adminRole">
        <input name="adminId" type="hidden" value="${admin.adminId}">
        <span>权限：</span>
        <select id="adminRole" name="adminRole">
                <option value="院系" selected>院系</option>
                <option value="超级">超级</option>
        </select>
    </label>
    <label for="faculty">
        <span>所属院系：</span>
        <select id="faculty" name="faculty">
            <c:forEach items="${faculties}" var="faculty">
                <option value="${faculty.facultyId}">${faculty.facultyName}</option>
            </c:forEach>
        </select>
    </label>
    <div id="button">
        <input id="editButton" name="editButton" type="button" class="add-but" value="修改信息"
               onclick="validatePost()">
    </div>
</form>
</body>
</html>